<template>
  <div>time2页面</div>
  <div>当前时间：{{ fotmat(time) }}</div>

  <button @click="fn(-1)">count--</button>
  <span>{{ count }}</span>
  <button @click="fn(1)">count++</button>
</template>

<script setup>
import { ref } from "vue";
import { fotmat } from "../utils/index";
import useCounter from "@/hooks/useCounter";

const time = ref(1731978226787);

const [count, fn] = useCounter(20);
</script>
